package edu.yuhf.streamdemo;

import edu.yuhf.vo.Person;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class PersonCollectionOperation {

    public void ListString2Person(){
        List<String> list0 = new ArrayList<>();
        list0.add("1");
        list0.add("2");
        list0.add("3");
        List<Person> list1 = list0.stream().map(value->Integer.valueOf(value))
                .map(value->new Person(value)).collect(Collectors.toList());
        list1.forEach(element->element.show());
    }
}
